package com.juyu.miliao.api.util;

import com.juyu.miliao.api.domain.dto.CompenstateUserVipDTO;

/**
 * 补偿uservip 常量
 * @author xuanqicheng
 */
public class CompenstateUserVipUtil {

    private static final String COMPENSTATE_USER_VIP_SIGNE_KEY = "1rp0VDNsSfOAspK!";


    /**
     * 校验md5
     * @return
     */
    public static boolean checkCompenstateUserVipSigne(CompenstateUserVipDTO compenstateUserVipDTO){
        boolean bl = false;
       String value = "userId="+compenstateUserVipDTO.getUserId()+"&vipId="+compenstateUserVipDTO.getVipId()+
               "&contentType="+compenstateUserVipDTO.getContentType()+"&payNum="+compenstateUserVipDTO.getPayNum()+
               COMPENSTATE_USER_VIP_SIGNE_KEY;
       String signe = Md5Util.md5Encode(value);

       if(signe.equalsIgnoreCase(compenstateUserVipDTO.getSigne())){
           bl = true;
       }
       return bl;
    }

}
